import request from "@/utils/request";

// 登录
export const login = (data) => {
  return request.post("user/login", data);
};

// 获取用户信息
export const info = () => {
  return request.get("user/info");
};

// 获取所有用户
export const list = (params) => {
  return request.get("user/list", { params });
};

// 更新用户
export const update = (data) => {
  return request.put("user/update", data);
};

// 删除用户
export const del = (id) => {
  return request.delete(`user/delete/${id}`);
};
